package com.treehouse.service.application;

import java.awt.Dimension;
import java.awt.Toolkit;

import com.treehouse.logging.Logger;
import com.treehouse.properties.ICrawlerProperties;

public class ApplicationService implements IApplicationService{

	private ICrawlerProperties properties;
	
	public ApplicationService(ICrawlerProperties properties){
		this.properties = properties;
	}
	
	@Override
	public String getApplicationName() {
		return this.properties.getProperty("applicationname");
	}

	@Override
	public Dimension getResolution() {
		return new Dimension(Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height - 70);
	}

	@Override
	public void terminateApplication() {
		Logger.inf("Terminating Application..");
		System.exit(0);
	}

	@Override
	public String getPornstarEntry() {
		return this.properties.getProperty("pornstarentry");
	}

	@Override
	public String getDomain() {
		return this.properties.getProperty("domain");
	}
}
